import React from 'react'
import { connect } from 'react-redux'
import RComponent from '../../components'

class LoginSuccess extends RComponent {
    constructor(props,context){
        super(props,context)
    }

    componentDidMount(){
        // debugger;
        let fromUrl = document.referrer
        console.log(fromUrl)
        // if(/omm\/phonex/.test(fromUrl)){
            window.top.postMessage('loggedIn','*')
        // }
    }

    componentWillUnmount(){

    }

    postMessage(){

    }

    render(){
        return(
            <h1>登录成功</h1>
        )
    }
}

export default connect(
    state => ({
        loggedIn:true
    })
)(LoginSuccess)
